package deng.java.examples;

import java.io.PrintStream;

/**
 * Hello program.
 * 
 * @author Zemian Deng
 */
public class Hello {

	public static void main(String[] args) {
		String name = args[0];
		PrintStream out = System.out;
		Hello main = new Hello(name, out);
		main.run();
	}

	protected String name;
	protected PrintStream out;

	public Hello(String name, PrintStream out) {
		this.name = name;
		this.out = out;
	}

	public void run() {
		out.println(getGreeting());
	}
	
	protected String getGreeting() {
		return "Hello " + name;
	}
}